<!-- Dom模板 -->
<template>
  <div class="tans">
    <!-- Dom内容 -->

    <div class="onon" v-for="(item,index) in searchData" :key="index" @click="toXq(item,index)" >
        <div>
            <img :src="item.bookImg" alt="">
        </div>
        <div>
            <p>{{item.bookName}}</p>
            <p>{{item.softContent}}</p>
        </div>
    </div>
  </div>
</template>

<script>
export default {
    props:["searchData"],
  name: '',
  data() {
    return {
      msg: '测试'
    }
  },
  // 生命周期 - 创建完成（访问当前this实例）
  created() {
      
  },
  // 生命周期 - 挂载完成（访问DOM元素）
  mounted() {
    
  },
  // Vue方法定义
  methods: {
    toXq(item,index){
       this.$router.push({
        path: `/story/${item.bookId}`
      });
    }
  }
}
</script>

<style scoped>
/* @import url(''); 引入css类 */
@import url("../../../assets/font/iconfont.css");

.tans{
    width: 100vw;
    height: 672px;
    position: absolute;
    bottom: 0;
    background: white;
   
    overflow-y:auto ;
}
.onon{
  margin-top: 15px;
    width: 100vw;
    height: 100px;
    margin-bottom: 10px;
       line-height: 100px;
    /* display: flex; */
    /* justify-content: space-around; */

}
.onon img{
  width: 50px;
  vertical-align: middle;

}
.onon >div{
  float: left;
   margin-left: 20px;

}
.top {
  left: 0px;
  top: 0px;
  width: 414px;
  height: 60px;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  /* align-items: center; */
    background: yellow;

  /* background-color: rgba(255, 255, 255, 100); */
}
.top_one {
  height: 32px;
      margin-bottom: 7px;
    margin-left: 5px;
  line-height: 32px;
}
.top_left {
  margin-left: 19px;
  left: 19px;
  top: 50px;
  float: left;
  margin-right: 34px;
  margin-bottom: 6px;
  width: 258px;
  padding-left: 8px;
  height: 32px;
  border-radius: 100px;
  background-color: rgba(242, 242, 242, 100);
  color: rgba(191, 191, 191, 100);
  font-size: 14px;
  text-align: left;
  overflow: hidden;
  margin-bottom: 6px;
  font-family: Arial;
}
.top_left input {
  height: 32px;
  background: none;
  border: none;
  outline: none;
}
.top_right {
  left: 311px;
  margin-right: 7px;
  float: left;
  top: 50px;
  width: 80px;
  height: 32px;
  line-height: 32px;
  margin-bottom: 6px;
  border-radius: 30px;
  background-color: rgba(255, 255, 255, 100);
  text-align: center;
  border: 1px solid rgba(232, 232, 232, 100);
}
.top_right button {
  height: 32px;
  text-align: center;
  line-height: 32px;
  font-size: 18px;
  border: none;
  background: none;
  color: red;
  display: inline-block;
}
</style>